package com.realestate.model;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;


/**
 * The persistent class for the brtb_product database table.
 * 
 */
@Entity
@Table(name="brtb_product")
public class BrtbProduct implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private String address;
	private String addressMap;
	private Integer bathroom;
	private Integer bedroom;
	private BrtbBuilding brtbBuilding;
	private BrtbCategory brtbCategory;
	private String description;
	private BrtbDistrict brtbDistrict;
	private BrtbInterior brtbInterior;
	private Date makeDate;
	private String makerId;
	private String picture;
	private Integer price;
	private String productCode;
	private String productName;
	private String recordStatus;
	private Integer room;
	private Integer sqft;
	private String typeProduct;
	private String unitSqft;
	private String special;
	private String unitPrice;
	
	private Set<BrtbProductAttributeValue> brtbProductAttributeValues = new HashSet<BrtbProductAttributeValue>();

	private Set<BrtbProductCommonAttrValue> brtbProductCommonAttrValues = new HashSet<BrtbProductCommonAttrValue>();
	
	public BrtbProduct() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="address")
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}


	@Column(name="address_map")
	public String getAddressMap() {
		return this.addressMap;
	}

	public void setAddressMap(String addressMap) {
		this.addressMap = addressMap;
	}

	@Column(name="bathroom")
	public Integer getBathroom() {
		return this.bathroom;
	}

	public void setBathroom(Integer bathroom) {
		this.bathroom = bathroom;
	}

	@Column(name="bedroom")
	public Integer getBedroom() {
		return this.bedroom;
	}

	public void setBedroom(Integer bedroom) {
		this.bedroom = bedroom;
	}

	@ManyToOne
	@JoinColumn(name = "building_id")
	public BrtbBuilding getBrtbBuilding() {
		return this.brtbBuilding;
	}

	public void setBrtbBuilding(BrtbBuilding brtbBuilding) {
		this.brtbBuilding = brtbBuilding;
	}


	@ManyToOne
	@JoinColumn(name = "category_id")
	public BrtbCategory getBrtbCategory() {
		return this.brtbCategory;
	}

	public void setBrtbCategory(BrtbCategory brtbCategory) {
		this.brtbCategory = brtbCategory;
	}


	@Lob
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@ManyToOne
	@JoinColumn(name = "district_id")
	public BrtbDistrict getBrtbDistrict() {
		return this.brtbDistrict;
	}

	public void setBrtbDistrict(BrtbDistrict brtbDistrict) {
		this.brtbDistrict = brtbDistrict;
	}

	@ManyToOne
	@JoinColumn(name = "interior_id")
	public BrtbInterior getBrtbInterior() {
		return this.brtbInterior;
	}

	public void setBrtbInterior(BrtbInterior brtbInterior) {
		this.brtbInterior = brtbInterior;
	}


	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="make_date")
	public Date getMakeDate() {
		return this.makeDate;
	}

	public void setMakeDate(Date makeDate) {
		this.makeDate = makeDate;
	}

	@Column(name="makerId")
	public String getMakerId() {
		return this.makerId;
	}

	public void setMakerId(String makerId) {
		this.makerId = makerId;
	}

	@Column(name="picture")
	public String getPicture() {
		return this.picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	@Column(name="price")
	public Integer getPrice() {
		return this.price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}


	@Column(name="product_code")
	public String getProductCode() {
		return this.productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}


	@Column(name="product_name")
	public String getProductName() {
		return this.productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}


	@Column(name="record_status")
	public String getRecordStatus() {
		return this.recordStatus;
	}

	public void setRecordStatus(String recordStatus) {
		this.recordStatus = recordStatus;
	}

	@Column(name="room")
	public Integer getRoom() {
		return this.room;
	}

	public void setRoom(Integer room) {
		this.room = room;
	}

	@Column(name="sqft")
	public Integer getSqft() {
		return this.sqft;
	}

	public void setSqft(Integer sqft) {
		this.sqft = sqft;
	}


	@Column(name="type_product")
	public String getTypeProduct() {
		return this.typeProduct;
	}

	public void setTypeProduct(String typeProduct) {
		this.typeProduct = typeProduct;
	}


	@Column(name="unit_sqft")
	public String getUnitSqft() {
		return this.unitSqft;
	}

	public void setUnitSqft(String unitSqft) {
		this.unitSqft = unitSqft;
	}

	@OneToMany(mappedBy = "brtbProduct")
	public Set<BrtbProductAttributeValue> getBrtbProductAttributeValues() {
		return this.brtbProductAttributeValues;
	}

	public void setBrtbProductAttributeValues(
			Set<BrtbProductAttributeValue> brtbProductAttributeValues) {
		this.brtbProductAttributeValues = brtbProductAttributeValues;
	}

	@OneToMany(mappedBy = "brtbProduct")
	public Set<BrtbProductCommonAttrValue> getBrtbProductCommonAttrValues() {
		return this.brtbProductCommonAttrValues;
	}

	public void setBrtbProductCommonAttrValues(
			Set<BrtbProductCommonAttrValue> brtbProductCommonAttrValues) {
		this.brtbProductCommonAttrValues = brtbProductCommonAttrValues;
	}
	
	@Column(name="special")
	public String getSpecial() {
		return special;
	}

	public void setSpecial(String special) {
		this.special = special;
	}

	@Column(name="unit_price")
	public String getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(String unitPrice) {
		this.unitPrice = unitPrice;
	}
}